package com.yl.chainStore.entity.customer

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.chainStore.common.enums.TypeEnum
import com.yl.common.annotation.NoArg
import com.yl.common.getContext

/**
 * <p>
 * 患者二级来源
 * </p>
 *
 * @author cxw
 * @since 2021-11-21
 */
@NoArg
@TableName("customer_info_second_source")
    data class CustomerInfoSecondSource  (

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    var id: Long,

    /**
     * 显示名称
     */
    @TableField("name")
    var name: String,

    /**
     * 子级类型 1301-1310
     */
    @TableField("sub_type")
    var subType: TypeEnum = TypeEnum.CUSTOMER_INFO_SOURCE_DIST,

    /**
     * 公司id
     */
    @TableField("company_id")
    var companyId: Long = getContext().companyId,

    /**
     * 上级类型
     */
    @TableField("parent_value")
    var parentValue: String,

    @TableField("enabled")
    var enabled:Int = 1,

    @TableField("order_num")
    var orderNum:Int = 99,
    )
